<?php include("inc/app_constants.php"); ?>
<!DOCTYPE html>
<html lang="en">
<head>

  <!-- Basic Page Needs
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  <meta charset="utf-8">
  <title>Online-Reservation Application (ORA)</title>
  <meta name="description" content="">
  <meta name="author" content="">

  <!-- Mobile Specific Metas
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!-- FONT
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  <link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">

  <!-- CSS
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  <link rel="stylesheet" href="Content/skeleton/normalize.css">
  <link rel="stylesheet" href="Content/skeleton/skeleton.css">
  <link rel="stylesheet" href="Content/w2ui/w2ui-1.4.2.css">
  <link rel="stylesheet" href="Content/Site.css">

  <!-- Favicon
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  <link rel="icon" type="image/png" href="images/favicon.png">

</head>
<body>
    <div class="u-full-width" style="border-bottom:medium fuchsia solid;">
        <h1 class="brand">Proof-of-Concept</h1>
    </div>

    <div class="u-pull-left">
        <ul class="menu">
            <li><a href="Customer.php">Customers</a></li>
            <li>Employees</li>
            <li>Sales</li> 
        </ul>
    </div>
  <!-- Primary Page Layout
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  <div class="container">
    <div class="row">
        <div class="twelve columns">
            <h2>Customers</h2>
            
<?php
    $conn = sqlsrv_connect(DB::ServerName("Northwind"), DB::ConnectionInfo("Northwind"));
    if( $conn === false )
    {
         echo "Unable to connect.</br>";
         die( print_r( sqlsrv_errors(), true));
    }
    
    /* Query SQL Server for the login of the user accessing the database. */
    $tsql = "SELECT * FROM Customers WHERE ";
    $stmt = sqlsrv_query( $conn, $tsql);
    if( $stmt === false )
    {
         echo "Error in executing query.</br>";
         die( print_r( sqlsrv_errors(), true));
    }
    
    /* Retrieve and display the results of the query. */
    $row = sqlsrv_fetch_array($stmt);
    if (!is_null($row)) 
    {
        // Table Header
        do{
            // Table body rows
    
            $row = sqlsrv_fetch_array($stmt);
        } while(!is_null($row));
        // Table close
    }

    /* Free statement and connection resources. */
    sqlsrv_free_stmt( $stmt);
    sqlsrv_close( $conn);
?>
            
            
<table class="u-full-width">
  <thead>
    <tr>
      <th>Name</th>
      <th>Age</th>
      <th>Sex</th>
      <th>Location</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Dave Gamache</td>
      <td>26</td>
      <td>Male</td>
      <td>San Francisco</td>
    </tr>
    <tr>
      <td>Dwayne Johnson</td>
      <td>42</td>
      <td>Male</td>
      <td>Hayward</td>
    </tr>
  </tbody>
</table>


        </div>
    </div>
    
  </div>

<!-- End Document
  –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  <script type="text/javascript" src="Scripts/w2ui/w2ui-1.4.2.js"></script>
</body>
</html>
